<!--{include header}-->
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="content">
    <form action="/team/buy.php?id={$team['id']}" method="post" class="validator">
	<input id="deal-per-number" value="{$team['per_number']}" type="hidden" />
    <div id="deal-buy" class="box">
        <div class="box-top"></div>
        <div class="box-content">
            <div class="head"><h2>Envie seu pedido<!--{if $team['farefree']>0}-->&nbsp;(<span class="currency">{$team['farefree']}</span>livre de taxas)<!--{/if}--></h2></div>
            <div class="sect">
            <table class="order-table">
                <tr>
                    <th class="deal-buy-desc">Oferta</th>
                    <th class="deal-buy-quantity">quantidade</th>
                    <th class="deal-buy-multi"></th>
                    <th class="deal-buy-price">preço</th>
                    <th class="deal-buy-equal"></th>
                    <th class="deal-buy-total">total</th>
                </tr>
                <tr>
                    <td class="deal-buy-desc">{$team['title']}</td>
                    <td class="deal-buy-quantity"><input type="text" class="input-text f-input" maxlength="4" name="quantity" value="{$order['quantity']}" ff="${abs(intval($team['farefree']))}" id="deal-buy-quantity-input" ${$team['per_number']==1?'readonly':''} /><br /><span style="font-size:12px;color:gray;"><!--{if $team['per_number']==0}-->no total 9999 peças<!--{else}-->no máximo{$team['per_number']}pieces<!--{/if}--></span></td>
                    <td class="deal-buy-multi">x</td>
                    <td class="deal-buy-price"><span class="money">{$currency}</span><span id="deal-buy-price">{$team['team_price']}</span></td>
                    <td class="deal-buy-equal">=</td>
                    <td class="deal-buy-total"><span class="money">{$currency}</span><span id="deal-buy-total">{$order['quantity']*$team['team_price']}</span></td>
                </tr>
				<!--{if $team['delivery']=='express'}-->
                <tr>
                    <td class="deal-buy-desc">express</td>
                    <td class="deal-buy-quantity"></td>
                    <td class="deal-buy-multi"></td>
                    <td class="deal-buy-price"><span class="money">{$currency}</span><span id="deal-express-price" v="{$team['fare']}">{$team['fare']}</span></td>
                    <td class="deal-buy-equal">=</td>
                    <td class="deal-buy-total"><span class="money">{$currency}</span><span id="deal-express-total" v="{$team['fare']}">{$team['fare']}</span></td>
                </tr>
				<!--{/if}-->

				<tr class="order-total">
                    <td class="deal-buy-desc"><strong>Valor total de pedidos?</strong></td>
                    <td class="deal-buy-quantity"></td>
                    <td class="deal-buy-multi"></td>
                    <td class="deal-buy-price"></td>
                    <td class="deal-buy-equal">=</td>
                    <td class="deal-buy-total"><span class="money">{$currency}</span><strong id="deal-buy-total-t">{$order['origin']}</strong></td>
                </tr>
            </table>

			<!--{if $team['delivery']=='express'}-->
			<div class="expresstip">${nl2br(htmlspecialchars($team['express']))}</div>
			<div class="wholetip clear"><h3>Informações</h3></div>
			<div class="field username">
				<label>Recibo</label>
				<input type="text" size="30" name="realname" id="settings-realname" class="f-input" value="{$login_user['realname']}" require="true" datatype="require" />
				<span class="hint">Nome do que irá constar no copum deverá ser igual a carteira de identidade para que a entrega seja feita.</span>
			</div>
			<div class="field mobile">
				<label>Celular</label>
				<input type="text" size="30" name="mobile" id="settings-mobile" class="number" value="{$login_user['mobile']}" require="true" datatype="mobile" maxLength="11" /> <span class="inputtip">Seu celular é o meio mais importante para nós contactá-lo, por favor, introduza o número corretamente</span>
			</div>
				<div class="field username">
				<label>Endereço</label>
				<input type="text" size="30" name="address" id="settings-address" class="f-input" value="{$login_user['address']}" require="true" datatype="require" />
				<span class="hint">Para uma entrega, por favor insira seu endereço</span>
			</div>
			<div class="field mobile">
				<label>CEP</label>
				<input type="text" size="30" name="zipcode" id="settings-mobile" class="number" value="{$login_user['zipcode']}" require="true" datatype="zip" maxLength="6" />
			</div>
			<!--{else}-->
			<div class="field mobile">
				<label>celular</label>
				<input type="text" size="30" name="mobile" id="settings-mobile" class="number" value="{$login_user['mobile']}"  datatype="mobile" maxLength="11" /><span class="inputtip">Por favor coloque um número correto (você pode comprar para seu amigo)</span>
			</div>
			<!--{/if}-->
			<div class="wholetip clear"><h3>Informações adicionais</h3></div>
			<!--{if $condbuy=nanooption($team['condbuy'])}-->
			<div class="field mobile">
				<label>{$team['condbuy_titulo']}</label>
				<select name="condbuy" class="f-input" style="width:auto;">${Utility::Option(array_combine($condbuy, $condbuy), 'condbuy')}</select>
			</div>
			<!--{/if}-->
			<div class="field mobile">
				<label>informação pedido</label>
				<textarea name="remark" style="width:500px;height:80px;padding:2px;">${htmlspecialchars($order['remark'])}</textarea>
			</div>
            <input type="hidden" name="id" value="{$order['id']}" />
			<div class="form-submit"><input type="submit" class="formbutton" name="buy" value="Confirmado"/></div>
            </div>
        </div>
        <div class="box-bottom"></div>
    </div>
    </form>
</div>
<div id="sidebar">
	<!--{include block_side_credit}-->
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<!--{include footer}-->
